package ua.simplecoding.kievhome.domain;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "appartment_address")
public class AppartmentAddress extends AbstractPrimaryEntity implements Serializable {

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "city_fk", referencedColumnName = "pk")
    private City city;

    @Column(name = "street_name")
    private String streetName;

    @Column(name = "house_number")
    private String houseNo;

    public AppartmentAddress(int id) {
        super(id);
    }

    public AppartmentAddress() {
    }

    public City getCity() {
        return city;
    }

    public void setCity(City city) {
        this.city = city;
    }

    public String getStreetName() {
        return streetName;
    }

    public void setStreetName(String streetName) {
        this.streetName = streetName;
    }

    public String getHouseNo() {
        return houseNo;
    }

    public void setHouseNo(String houseNo) {
        this.houseNo = houseNo;
    }
}
